package fasilkom.antz.gui;

import java.awt.Color;
import java.awt.Font;

import com.golden.gamedev.gui.theme.basic.BasicTheme;
import com.golden.gamedev.gui.toolkit.UIConstants;
import com.golden.gamedev.gui.toolkit.UIRenderer;
import com.golden.gamedev.object.GameFont;

import fasilkom.antz.WorldMap;


/**
 * Custom theme that's used in main menu.
 *
 */
public class CustomTheme extends BasicTheme {

	public static final int TITLE_HEIGHT = 30;

	public CustomTheme(WorldMap game) {
		installUI(new CustomPanelRenderer());
		installUI(new CustomButtonRenderer(game));
		installUI(new CustomLabelRenderer());
		installUI(new CustomTitleBarRenderer());
		installUI(new CustomTitleBarButtonRenderer());
		
		GameFont font = game.fontManager.getFont(new Font("Kristen ITC", 0, 18));
		
		getUIRenderer("Panel").put("Background Color", new Color(0x66ffffff, true));
		
		UIRenderer button = getUIRenderer("Button");
		button.put("Background Color", new Color(0x66ffffff, true));
		button.put("Background Over Color", new Color(0x66333333, true));
		button.put("Background Pressed Color", new Color(0x66333333, true));
		button.put("Text Font", font);
		button.put("Text Over Font", font);
		button.put("Text Pressed Font", font);
		
		UIRenderer label = getUIRenderer("Label");
		label.put("Background Color", new Color(0, true));
		label.put("Text Font", font);
		label.put("Text Horizontal Alignment Integer", UIConstants.CENTER);
		
		UIRenderer titleBar = getUIRenderer("TitleBar");
		titleBar.put("Text Font", font);
		titleBar.put("Background Color", new Color(0x66333333, true));
		
		UIRenderer titleBarButton = getUIRenderer("TitleBarButton");
		titleBarButton.put("Background Color", new Color(0x66ffffff, true));
		titleBarButton.put("Background Over Color", new Color(0x66333333, true));
		titleBarButton.put("Background Pressed Color", new Color(0x66333333, true));
	}	
}
